package com.ivo.service.pdm;

import java.util.List;

import org.springframework.stereotype.Service;

import com.ivo.model.MasterInstance;
import com.ivo.service.BaseService;

@Service
public class MasterInstanceService extends BaseService<MasterInstance>
{

	public MasterInstance getMastInsByCate(Long cateId)
	{
		List list = hibernateCaller.find( " from MasterInstance a where a.category.cateId = ? and a.isValid = 1 ", cateId );
		MasterInstance mastIns = null;
		if( list.size() > 0 ) mastIns = (MasterInstance) list.get( 0 );

		return mastIns;
	}

}
